<? if ($c = stack('name')) { $d = component_data($c); ?>

<script type="text/javascript">
	<?=$c?>_data = { <? 
		$temp = array(); 
		foreach ($d as $day => $v) 
			$temp[] = "\"$day\" : { title : \"$v[title]\", image : { x : {$v[image][x]}, y : {$v[image][y]}, fn : \"{$v[image][fn]}\" } }";
		?><?=implode(', ', $temp)?><?
	?> };
</script>

<?	
	unstack();
} ?>